#!/usr/bin/env node

// const program = require('commander'); // (normal include)
const program = require('../'); // include commander in git clone of commander repo

let cmdValue;
let envValue;

program
  .version('0.0.1')
  .arguments('<cmd> [env]')
  .action(function(cmd, env) {
    cmdValue = cmd;
    envValue = env;
  });

program.parse(process.argv);

if (typeof cmdValue === 'undefined') {
  console.error('no command given!');
  process.exit(1);
}
console.log('command:', cmdValue);
console.log('environment:', envValue || 'no environment given');
